from quart import Quart, jsonify
import sys
import os

# 添加项目根目录到Python路径
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from src.route.healthy.healthy_route import healthy_route

# 创建Quart应用
app = Quart(__name__)

# 注册健康检查蓝图
app.register_blueprint(healthy_route)

# Vercel serverless函数入口点
def handler(request):
    return app(request.environ, lambda status, headers: None)

# 如果直接运行此文件
if __name__ == '__main__':
    app.run(debug=True)